package com.network.demo.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.network.demo.mapper.NetWorkMapper;
import com.network.demo.pojo.ErrorInfo;
import com.network.demo.pojo.NetWorkDTO;
import com.network.demo.pojo.NetWorkVO;
import com.network.demo.service.NetWorkService;

@Service
public class NetWorkServiceImpl implements NetWorkService{
    @Autowired
    private NetWorkMapper netWorkMapper;

    @Override
    public ErrorInfo NetWorkReceive(NetWorkVO netWorkVO) {
        String ip = netWorkVO.getIp();
        int port = netWorkVO.getPort();
        NetWorkDTO netWorkDTO = new NetWorkDTO(ip, port);
        netWorkMapper.AddNetwork(netWorkDTO);
        return ErrorInfo.success("success");
    }

    
}